package kr.hkit.myframework.uicomp;

import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.GridLayout;
import javax.swing.JComboBox;
import javax.swing.SwingConstants;

public class ComboPanel extends JPanel {
	private JLabel lbl;
	private JComboBox cb;

	/**
	 * Create the panel.
	 */
	public ComboPanel(String str) {

		initialize();
		lbl.setText(str);
	}
	private void initialize() {
		setLayout(new GridLayout(0, 2, 0, 0));
		
		lbl = new JLabel("New label");
		lbl.setHorizontalAlignment(SwingConstants.CENTER);
		add(lbl);
		
		cb = new JComboBox();
		cb.setEditable(true);
		add(cb);
	}
	public JComboBox getCb() {
		return cb;
	}
	public void setCb(JComboBox cb) {
		this.cb = cb;
	}
	
	public void cbEdit(boolean e){
		this.cb.setEditable(e);
	}
	
	public void cbEnable(boolean e){
		this.cb.setEnabled(e);
	}
	

}
